var mysql      = require('mysql');
var bdConfig      = require('../config/database').offline;

var user =  {

	login:function (config,callback) {
		var connection = mysql.createConnection(bdConfig);
		connection.connect();
		var sql = 'SELECT * from  `t_user` ';
		connection.query(sql,function (err, result) {
			if(err){
				callback(err);
				return;
			}
			callback(result);
		});
		connection.end();
	},




};

module.exports = user;


